<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
sessionUser:
<div th:text="${session.sessionUser.name}"></div>
<span th:text="|欢迎您:${user.name}|"></span>这是首页
<span th:if="${user.age} < 18">小鲜肉</span>
<p>
    今天是: <span th:text="${#dates.format(date,'yyyy-MM-dd hh:mm:ss')}">2018-04-25</span>
</p>
<p>Name: <span th:text="${user.name}">Jack</span>.</p>
<p>Age: <span th:text="${user.age}">21</span>.</p>
<h1 th:text="${host}">Hello World,这是首页</h1>
<hr/>
<h2 th:object="${user}">
    <p>Name: <span th:text="*{name}">Jack</span>.</p>
    <p>Age: <span th:text="*{age}">21</span>.</p>
</h2>
<hr/>
<!--<h2 th:object="${user}">-->
    <!--<p>FirstName: <span th:text="*{name.split(' ')[0]}">Jack</span>.</p>-->
    <!--<p>LastName: <span th:text="*{name.split(' ')[1]}">Li</span>.</p>-->
<!--</h2>-->
<script th:inline="javascript">
    const user = /*[[${user}]]*/ {};
    const age = /*[[${user.age}]]*/ 20;
    console.log(user);
    console.log(age)
    alert(age)
</script>
</body>
</html>